<div id="login_form">
<%= error_messages_for :user %>
<% form_for :user, :html => {:id => 'login_form'} do |f| -%>
<p><label for="login">Login</label><br/>
<%= f.text_field :login, :onfocusout => 'check_user_login()', :onfocus => 'user_login_msg_clear()' %>
<span id="user_login_msg"></span></p>

<p><label for="email">Email</label><br/>
<%= f.text_field :email, :onfocusout => 'check_user_email()', :onfocus => 'user_email_msg_clear()' %>
<span id="user_email_msg"></span></p>

<p><label for="password">Password</label><br/>
<%= f.password_field :password, :onfocusout => 'check_user_pwd()', :onfocus => 'user_pwd_msg_clear()' %>
<span id="user_pwd_msg"></span></p>
    
<p><label for="password_confirmation">Confirm Password</label><br/>
<%= f.password_field :password_confirmation, :onfocusout => 'check_user_pwdc()', :onfocus => 'user_pwdc_msg_clear()' %>
<span id="user_pwdc_msg"></span></p>

<p><button id="btn_submit" class="btn_add" onClick="submit_form(this.form)">注册</button>&nbsp;&nbsp;<span id="submit_msg"></span></p>
<% end -%>
</div>